//
//  RelatedAdvisoryCell.m
//  WE
//
//  Created by iMacOne on 15/11/19.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "RelatedAdvisoryCell.h"
#import "Head.h"
@interface RelatedAdvisoryCell ()

@property (nonatomic, strong)UIImageView * aImgeView;
@property (nonatomic, strong)UILabel * disLabel;
@property (nonatomic, strong)UILabel * moreLabel;
@property (nonatomic, strong)UIImageView * chooseImgeView;
@property (nonatomic, strong)UIButton * moreButton;
@property (nonatomic, strong)UIScrollView * scrollView;
//@property (nonatomic, strong) CustomView *
@end
@implementation RelatedAdvisoryCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        self.aImgeView = [[UIImageView alloc] initWithFrame:CGRectMake(margin_5 * Width, margin_10 * Height, margin_20 , margin_20)];
        self.aImgeView.layer.masksToBounds = YES;
        self.aImgeView.layer.cornerRadius = 10;
        self.aImgeView.backgroundColor = [UIColor colorWithRed:0.7659 green:0.3357 blue:0.5685 alpha:1.0];
        _aImgeView.image = [UIImage imageNamed:@"iconfont-shangxianjieda"];
        
        self.disLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.aImgeView.frame) + margin_5 * Width, self.aImgeView.frame.origin.y, margin_64, self.aImgeView.frame.size.height)];
        self.disLabel.font = FONT(14);
        self.disLabel.text = @"相关咨询";
        
        self.moreLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, margin_30, margin_10)];
        self.moreLabel.text = @"更多";
        self.moreLabel.font = FONT(10);
        self.moreLabel.textColor = [UIColor grayColor];
//        self.moreLabel.backgroundColor = [UIColor cyanColor];
        
        self.chooseImgeView = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_moreLabel.frame) - 5, _moreLabel.frame.origin.y - 2, margin_15, margin_15)];
        //        _chooseImgeView.backgroundColor = DEBUG_CLOLR;
        _chooseImgeView.image = [UIImage imageNamed:@"zanting"];
        
        self.moreButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.moreButton.frame = CGRectMake(WindowWidth - margin_64, self.aImgeView.frame.origin.y, margin_48, self.aImgeView.frame.size.height);
        [self.moreButton addTarget:self action:@selector(doClickButton:) forControlEvents:UIControlEventTouchUpInside];
        self.moreButton.tag = 100;
//        self.moreButton.backgroundColor = [UIColor yellowColor];
        [self.moreButton addSubview:self.moreLabel];
        [self.moreButton addSubview:self.chooseImgeView];
        
        
        
        
        [self.contentView addSubview:self.aImgeView];
        [self.contentView addSubview:self.disLabel];
        [self.contentView addSubview:self.moreButton];
    }
    return self;
}
- (void)doClickButton:(UIButton *)btn
{
    
    [self.delegate doClickBtn:btn.tag cell:self];
}


@end
